<nav aria-label="..." class="paginator">
  <ul
    class="pager"
    data-current="<%=page%>"
    data-max-page="<%= ~~(count/limit) %>"
    data-count="<%= count %>"
    data-limit="<%= limit %>"
    <%= async?'async':''%>
  >
    <% if(page !==0){%>
    <li>
      <a
        href="?limit=5&page=<%=page-1%>"
        class="glyphicon glyphicon-chevron-left control"
      ></a>
    </li>
    <%}%> <%for(var i=0; i <count / limit; i++){%>
    <li>
      <a href="?limit=5&page=<%=i%>" class="<%= i===page?'active':''%>">
        <%= i+1 %>
      </a>
    </li>
    <%}%> <%if(page <(count / limit - 1)){%>
    <li>
      <a
        href="?limit=5&page=<%=page+1%>"
        class="glyphicon glyphicon-chevron-right control"
      ></a>
    </li>
    <%}%>
  </ul>
</nav>
